Moves the middle of the overlay effect’s Shape to the spot (x, y) on the screen, counted from the screen’s top-left corner. A spotlight follows the player when you call this every frame with the player’s place on the screen.
Works differently on Game Boy - The Game Boy moves the middle of the effect's Shape, and the Shape covers the screen in blocks of 8 by 8 pixels.
Works differently on Game Boy Color - The Game Boy Color moves the middle of the effect's Shape, and the Shape covers the screen from its left edge to the right side.
Works differently on Sega Genesis - The Sega Genesis plays overlay effects its own way: the effects it plays have no Shape, so this does nothing.
On other consoles this differs: see Side by side and How the consoles differ.
overlay_focus(x, y)| Name | Type |
|---|---|
x | int |
y | int |
Nothing.
Moves the middle of the playing overlay effect's Shape to the spot (x, y) on the screen, counted from the screen's top-left corner. The ready-made Spotlight and Searchlight are shapes: call overlay_focus every frame with the place of the thing the light follows and the light follows it.
The Shape of an effect is drawn around the middle of the screen, which is (120, 80). overlay_focus(120, 80) puts it back there. The spot stays where you put it until you call overlay_focus again, and it stays for the next effect too. An effect with no Shape does not care.
The numbers are places on the screen, not in the room. If the thing you follow is in the room, take away the camera's position first.
overlay_focus(150, 60);The middle of the shape moves to a spot to the right of and above the middle of the screen.
The Shape of an effect is drawn around the middle of the screen (120, 80); this moves its middle to (x, y), top-left, in screen pixels (not room pixels: use the camera to turn a place in the room into a place on the screen). It stays where you put it until you call it again, and it holds for the next effect too. It changes nothing for an effect with no Shape. The shape is held to the screen, so a shape moved off the edge is cut there. It costs nothing but the time to work the shape out again (about 2 hundredths of a frame).